using NL;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace SinceTimes.NetWork
{
    public class Peer_GUI : MonoBehaviour
    {
        static int NNNN;

        IPeer _Owner;

        int Number;
        // Start is called before the first frame update
        void Awake()
        {
           

            _Owner = GetComponent<IPeer>();
        }
        private void OnEnable()
        {
            Number = NNNN++;
        }
        private void OnDisable()
        {
            NNNN--;
            if(NNNN < 0)
                NNNN = 0;
        }
        string _Sending;
        private void OnGUI()
        {
            if (_Owner == null)
            
                return;

            GUI.Label(new Rect(20,Screen.height-20- Number*40, 2000, 30), _Owner.ToString() +"\t"+ _Owner.ToRuntimString());



            
        }

        // Update is called once per frame
        void Update()
        {

        }
    }

}
